<?php
// ##############################################################################||
// #                                                                 
// #   MySmartBB Version 1.7.0	                                      
// #   http://www.MySmartBB.com                                      
// #   Copyright (c) 2008 by MySmartBB team                           
// #   license http://opensource.org/licenses/gpl-license.php GNU Public License
// #                                                             
// #   filename : ajax.php                                            
// #   the banned check  file for MySmartBB Universal                             
// #                                                                  
// ##############################################################################||
         $getcards_query = $DB->sql_query("SELECT * FROM " . $db_prefix . "cards WHERE card_member='" . $member_row['username'] . "'");
         $getcards_num = $DB->sql_num_rows($getcards_query);
         $getcards_row = $DB->sql_fetch_array($getcards_query);
	     $Smarty->assign('getcards_row',$getcards_row);
	     $Smarty->assign('getcards_num',$getcards_num);
             if ($getcards_num != 0)
             {
if($getcards_row['card_black'] != ""){

				 $SF->error('لا يمكنك تصفح المنتدى');  }   
             }


$ip = $DB->sql_query("SELECT * FROM ". $db_prefix . "banned WHERE id=1");
$ip_row = $DB->sql_fetch_array($ip);
$ban = $ip_row['banned_ip'];
$visitor_ip = $_SERVER['REMOTE_ADDR'];
    $list = explode("
", $ban);
     foreach($list as $ip){
if($visitor_ip == $ip)
         {
$SF->error("المعذرة انت ممنوع من الدخول حاليا ");
}
}
?>